//
//  Profile.m
//  cliqset
//
//  Created by David Hinson on 2/25/09.
//  Copyright 2009 Cliqset, Inc.. All rights reserved.
//

#import "Profile.h"

// User Profile
@implementation Profile

@synthesize userIdentifier    = _userIdentifier;
@synthesize basicProfile      = _basicProfile;
@synthesize contactProfile    = _contactProfile;
@synthesize experienceProfile = _experienceProfile;

-(id)init {
	
	self = [super init];
	
	//self.userIdentifier    = [[NSMutableString alloc] init];
	self.basicProfile      = [[BasicProfile alloc] init];
	self.contactProfile    = [[Contact alloc] init];
	self.experienceProfile = [[ExperienceProfile alloc] init];
	
	return self;
}

-(void)dealloc {
	[_basicProfile release];
	[_contactProfile release];
	[_experienceProfile release];
	[super dealloc];
}

@end

// Basic Profile
@implementation BasicProfile

@synthesize givenName         = _givenName;
@synthesize middleName        = _middleName;
@synthesize familyName        = _familyName;
@synthesize honorificPrefix   = _honorificPrefix;
@synthesize honorificSuffix   = _honorificSuffix;
@synthesize birthdate         = _birthdate;
@synthesize politicalViews    = _politicalViews;
@synthesize religiousViews    = _religiousViews;
@synthesize gender            = _gender;
@synthesize locality          = _locality;
@synthesize region            = _region;
@synthesize country           = _country;
@synthesize postCode          = _postCode;
@synthesize maritalStatus     = _maritalStatus;
@synthesize sexualOrientation = _sexualOrientation;
@synthesize avatarURL         = _avatarURL;
@synthesize avatarBlob        = _avatarBlob;
@synthesize aboutMe           = _aboutMe;

-(id)init {
	self = [super init];
	return self;
}

-(void)dealloc {
	
	[_givenName release];
	[_middleName release];
	[_familyName release];
	[_honorificPrefix release];
	[_honorificSuffix release];
	[_birthdate release];
	[_politicalViews release];
	[_religiousViews release];
	[_gender release];
	[_locality release];
	[_region release];
	[_country release];
	[_postCode release];
	[_maritalStatus release];
	[_sexualOrientation release];
	[_avatarURL release];
	[_avatarBlob release];
	[_aboutMe release];
	
	[super dealloc];
}

@end

// Work Experience
@implementation WorkExperience

@synthesize workExperienceIdentifier = _workExperienceIdentifier;
@synthesize employer                 = _employer;
@synthesize position                 = _position;
@synthesize address                  = _address;
@synthesize startDate                = _startDate;
@synthesize endDate                  = _endDate;

-(id)init {
	self = [super init];
	
	self.workExperienceIdentifier = [[NSMutableString alloc] init];
	self.employer                 = [[NSMutableString alloc] init];
	self.position                 = [[NSMutableString alloc] init];
	self.address                  = [[Address alloc] init];
	self.startDate                = [[NSDate alloc] init];
	self.endDate                  = [[NSDate alloc] init];
	
	return self;
}

-(void)dealloc {
	
	[_workExperienceIdentifier release];
	[_employer release];
	[_position release];
	[_address release];
	[_startDate release];
	[_endDate release];
	[super dealloc];
}

@end

// Education Experience
@implementation EducationExperience

@synthesize educationExperienceIdentifier = _educationExperienceIdentifier;
@synthesize school                        = _school;
@synthesize schoolType                    = _schoolType;
@synthesize graduatingYear                = _graduatingYear;
@synthesize concentration                 = _concentration;

-(id)init {
	self = [super init];
	
	//self.educationExperienceIdentifier = [[NSMutableString alloc] init];
	//self.school                        = [[NSMutableString alloc] init];
	//self.schoolType                    = [[NSMutableString alloc] init];
	//self.graduatingYear                = [[NSDate alloc] init];
	//self.concentration                 = [[NSMutableString alloc] init];
	
	return self;
}

-(void)dealloc {
	[_educationExperienceIdentifier release];
	[_school release];
	[_schoolType release];
	[_graduatingYear release];
	[_concentration release];
	[super dealloc];
}

@end


// Experience Profile
@implementation ExperienceProfile

@synthesize workExperiences      = _workExperiences;
@synthesize educationExperiences = _educationExperiences;

-(id)init {
	self = [super init];
	
	//self.workExperiences      = [[NSMutableArray alloc] init];
	//self.educationExperiences = [[NSMutableArray alloc] init];
	
	return self;
}

-(void)dealloc {
	[_workExperiences release];
	[_educationExperiences release];
	[super dealloc];
}

@end


